//
//  PregnancyingViewController.m
//  SmartWatch
//
//  Created by zwj on 2022/11/28.
//

#import "PregnancyingViewController.h"
#import "CustomDateViewController.h"

@interface PregnancyingViewController ()

@end

@implementation PregnancyingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"怀孕期";
    self.view.backgroundColor = BACKGROUNDCOLOR;
}

- (void)initSubviews {
    [super initSubviews];
    
    MyLinearLayout *root = [MyLinearLayout linearLayoutWithOrientation:MyOrientation_Vert];
    root.myHorzMargin = 15;
    root.myTop = 15 + NavigationContentTop;
    root.myHeight = kAutoHeight;
    [self.view addSubview:root];
    
    MyLinearLayout *contentLay = [MyLinearLayout linearLayoutWithOrientation:MyOrientation_Vert];
    contentLay.myHorzMargin = 0;
    contentLay.padding = UIEdgeInsetsMake(0, 15, 0, 15);
    contentLay.backgroundColor = COLOR_4;
    contentLay.layer.cornerRadius = 15;
    contentLay.myHeight = kAutoHeight;
    [root addSubview:contentLay];
    
    MyLinearLayout *itemLay = [MyLinearLayout linearLayoutWithOrientation:MyOrientation_Horz];
    itemLay.myHorzMargin = 0;
    itemLay.gravity = MyGravity_Vert_Center;
    itemLay.myHeight = 52;
    [contentLay addSubview:itemLay];
    [itemLay setTarget:self action:@selector(itemLayClick)];
    
    
    {
        
        UILabel *name = [UILabel createLabelText:@"上次月经" font:UIFontMake(15) textColor:COLOR1515];
        name.myHeight = kAutoHeight;
        name.weight = 1;
        [itemLay addSubview:name];
        
        UILabel *content = [UILabel createLabelText:@"请选择" font:UIFontMake(15) textColor:HexColor(@"#BABABA")];
        content.mySize = kAutoSize;
        [itemLay addSubview:content];
        
        UIImageView *right = [[UIImageView alloc]initWithImage:UIImageMake(@"icon_arrow_right")];
        right.mySize = CGSizeMake(16, 16);
        [itemLay addSubview:right];
       
        
        
    }
    
    
    UIButton *submitBtn = [UIButton createButtonText:@"开始怀孕期模式" font:UIFontMake(14) textColor:COLOR_4];
    submitBtn.myHorzMargin = 0;
    submitBtn.myTop = 30;
    submitBtn.myHeight = 46;
    ViewCorner(submitBtn, 23);
    [submitBtn az_setGradientBackgroundWithColors:@[HexColor(@"#4BD8B1"),HexColor(@"#2CAED8")] locations:@[@0.0,@1.0] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1, 0.5)];
    [submitBtn addTarget:self action:@selector(submitBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [root addSubview:submitBtn];
}

- (void)itemLayClick {
    
}

- (void)submitBtnClick {
    CustomDateViewController *vc = CustomDateViewController.new;
    vc.title = self.title;
    [self showViewController:vc sender:self];
}



@end
